<template>
  <div>
    <!-- 事件.prevent 阻止默认提交 事件.stop 阻止冒泡 -->
      <form action="http://www.itcast.cn">
      <input type="text">
      <button @click.prevent.stop="fn">提交</button>
    </form>
   </div>
</template>
 
<script>
export default {
  data() {
    return {};
  },
  methods: {
    fn(){
      console.log('哈喽');
    }
  }
};
</script>

<style scoped>
     
</style>